project (halley-engine)

include_directories(${OPENSSL_INCLUDE_DIR} "include" "include/halley/core" "../../../shared_gen/cpp"  "../../contrib/libogg/include" "../../contrib/libogg/lib" "../../contrib/libvorbis/include" "../../contrib/libvorbis/lib"  "../../contrib/yaml-cpp/include" "../../contrib/lua/src")

set(SOURCES
        "src/api/halley_api.cpp"

        "src/dummy/dummy_analytics.cpp"
        "src/dummy/dummy_audio.cpp"
        "src/dummy/dummy_input.cpp"
        "src/dummy/dummy_network.cpp"
        "src/dummy/dummy_movie.cpp"
        "src/dummy/dummy_platform.cpp"
        "src/dummy/dummy_plugins.cpp"
        "src/dummy/dummy_system.cpp"
        "src/dummy/dummy_video.cpp"
        "src/dummy/dummy_web.cpp"

        "src/game/core.cpp"
        "src/game/environment.cpp"
        "src/game/frame_data.cpp"
        "src/game/game.cpp"
        "src/game/game_console.cpp"
        "src/game/halley_main.cpp"
        "src/game/halley_statics.cpp"
        "src/game/livepp.cpp"
        "src/game/main_loop.cpp"

        "src/graph/base_graph_node.cpp"
        "src/graph/base_graph_renderer.cpp"
        "src/graph/base_graph_type.cpp"
        "src/graph/base_graph.cpp"

        "src/graphics/blend.cpp"
        "src/graphics/camera.cpp"
        "src/graphics/material/material.cpp"
        "src/graphics/material/material_definition.cpp"
        "src/graphics/material/material_parameter.cpp"
        "src/graphics/mesh/mesh.cpp"
        "src/graphics/mesh/mesh_animation.cpp"
        "src/graphics/mesh/mesh_renderer.cpp"
        "src/graphics/movie/movie_player.cpp"
        "src/graphics/painter.cpp"
        "src/graphics/render_context.cpp"
        "src/graphics/render_snapshot.cpp"
        "src/graphics/render_target/render_graph.cpp"
        "src/graphics/render_target/render_graph_definition.cpp"
        "src/graphics/render_target/render_graph_node.cpp"
        "src/graphics/render_target/render_graph_node_types.cpp"
        "src/graphics/render_target/render_surface.cpp"
        "src/graphics/render_target/render_target_texture.cpp"
        "src/graphics/shader.cpp"
        "src/graphics/sprite/animation.cpp"
        "src/graphics/sprite/animation_player.cpp"
        "src/graphics/sprite/particles.cpp"
        "src/graphics/sprite/sprite.cpp"
        "src/graphics/sprite/sprite_painter.cpp"
        "src/graphics/sprite/sprite_sheet.cpp"
        "src/graphics/text/font.cpp"
        "src/graphics/text/text_renderer.cpp"
        "src/graphics/texture.cpp"
        "src/graphics/texture_descriptor.cpp"

        "src/input/input_button_base.cpp"
        "src/input/input_device.cpp"
        "src/input/input_exclusive.cpp"
        "src/input/input_joystick.cpp"
        "src/input/input_joystick_xinput.cpp"
        "src/input/input_keyboard.cpp"
        "src/input/input_manual.cpp"
        "src/input/input_touch.cpp"
        "src/input/input_vibration.cpp"
        "src/input/input_virtual.cpp"
        "src/input/text_input_capture.cpp"
        "src/input/text_input_data.cpp"

        "src/properties/audio_properties.cpp"
        "src/properties/game_properties.cpp"

        "src/resources/asset_database.cpp"
        "src/resources/asset_pack.cpp"
        "src/resources/resource_collection.cpp"
        "src/resources/resource_filesystem.cpp"
        "src/resources/resource_locator.cpp"
        "src/resources/resource_pack.cpp"
        "src/resources/resource_reference.cpp"
        "src/resources/resources.cpp"
        "src/resources/standard_resources.cpp"

        "src/stage/stage.cpp"

        "src/version/version.cpp"

        "src/devcon/devcon_client.cpp"
        "src/devcon/devcon_connection.cpp"
        "src/devcon/devcon_messages.cpp"
        "src/devcon/devcon_server.cpp"


        "src/net/connection/ack_unreliable_connection.cpp"
        "src/net/connection/ack_unreliable_connection_stats.cpp"
        "src/net/connection/instability_simulator.cpp"
        "src/net/connection/message_queue.cpp"
        "src/net/connection/message_queue_tcp.cpp"
        "src/net/connection/message_queue_udp.cpp"
        "src/net/connection/network_message.cpp"
        "src/net/connection/network_packet.cpp"
        "src/net/connection/network_service.cpp"

        "src/net/entity/entity_network_message.cpp"
        "src/net/entity/entity_network_remote_peer.cpp"
		"src/net/entity/entity_network_serialize.cpp"
        "src/net/entity/entity_network_session.cpp"

        "src/net/session/network_session_control_messages.cpp"
        "src/net/session/network_session.cpp"
        "src/net/session/session_multiplayer.cpp"
        "src/net/session/shared_data.cpp"

      	"src/net/interpolators/byte_data_interpolator.cpp"
        "src/net/interpolators/data_interpolator.cpp"

        "src/entity/component.cpp"
        "src/entity/create_functions.cpp"
        "src/entity/entity.cpp"
        "src/entity/entity_data.cpp"
        "src/entity/entity_data_delta.cpp"
        "src/entity/entity_data_instanced.cpp"
        "src/entity/entity_factory.cpp"
        "src/entity/entity_id.cpp"
        "src/entity/entity_scene.cpp"
        "src/entity/entity_stage.cpp"
        "src/entity/family.cpp"
        "src/entity/family_binding.cpp"
        "src/entity/family_mask.cpp"
        "src/entity/inspector.cpp"
        "src/entity/message.cpp"
        "src/entity/prefab.cpp"
        "src/entity/prefab_scene_data.cpp"
        "src/entity/system.cpp"
        "src/entity/world.cpp"
        "src/entity/world_reflection.cpp"
        "src/entity/world_scene_data.cpp"

        "src/entity/components/transform_2d_component.cpp"

        "src/entity/services/debug_draw_service.cpp"
        "src/entity/services/dev_service.cpp"
        "src/entity/services/enable_rules_service.cpp"
        "src/entity/services/painter_service.cpp"
        "src/entity/services/screen_service.cpp"
        "src/entity/services/scripting_service.cpp"
        "src/entity/services/session_service.cpp"

        "src/diagnostics/audio_view.cpp"
        "src/diagnostics/frame_debugger.cpp"
        "src/diagnostics/performance_stats.cpp"
        "src/diagnostics/stats_view.cpp"
        "src/diagnostics/world_stats.cpp"

        "src/scripting/script_environment.cpp"
        "src/scripting/script_graph.cpp"
        "src/scripting/script_message.cpp"
        "src/scripting/script_node_type.cpp"
        "src/scripting/script_renderer.cpp"
        "src/scripting/script_state.cpp"
        "src/scripting/script_state_set.cpp"
        "src/scripting/script_variables.cpp"

        "src/scripting/nodes/script_audio.cpp"
        "src/scripting/nodes/script_branching.cpp"
        "src/scripting/nodes/script_execution_control.cpp"
        "src/scripting/nodes/script_logic_gates.cpp"
        "src/scripting/nodes/script_entity.cpp"
        "src/scripting/nodes/script_flow_gate.cpp"
        "src/scripting/nodes/script_function.cpp"
        "src/scripting/nodes/script_input.cpp"
        "src/scripting/nodes/script_loop.cpp"
        "src/scripting/nodes/script_lua.cpp"
        "src/scripting/nodes/script_messaging.cpp"
        "src/scripting/nodes/script_meta.cpp"
        "src/scripting/nodes/script_network.cpp"
        "src/scripting/nodes/script_node_variables.cpp"
        "src/scripting/nodes/script_sprite.cpp"
        "src/scripting/nodes/script_transform.cpp"
        "src/scripting/nodes/script_ui.cpp"
        "src/scripting/nodes/script_wait.cpp"
        "src/scripting/nodes/script_wait_for.cpp"

        "src/ui/ui_anchor.cpp"
        "src/ui/ui_behaviour.cpp"
        "src/ui/ui_colour_scheme.cpp"
        "src/ui/ui_data_bind.cpp"
        "src/ui/ui_definition.cpp"
        "src/ui/ui_event.cpp"
        "src/ui/ui_event_handler.cpp"
        "src/ui/ui_factory.cpp"
        "src/ui/ui_factory_tester.cpp"
        "src/ui/ui_input.cpp"
        "src/ui/ui_painter.cpp"
        "src/ui/ui_parent.cpp"
        "src/ui/ui_entity_widget_reference.cpp"
        "src/ui/ui_root.cpp"
        "src/ui/ui_sizer.cpp"
        "src/ui/ui_style.cpp"
        "src/ui/ui_stylesheet.cpp"
        "src/ui/ui_validator.cpp"
        "src/ui/ui_widget.cpp"

        "src/ui/behaviours/ui_fade_behaviour.cpp"
        "src/ui/behaviours/ui_fullscreen_behaviour.cpp"
        "src/ui/behaviours/ui_notify_destroy_behaviour.cpp"
        "src/ui/behaviours/ui_reload_ui_behaviour.cpp"
        "src/ui/behaviours/ui_slide_behaviour.cpp"
        "src/ui/behaviours/ui_transition_slide_behaviour.cpp"

        "src/ui/widgets/ui_animation.cpp"
        "src/ui/widgets/ui_button.cpp"
        "src/ui/widgets/ui_checkbox.cpp"
        "src/ui/widgets/ui_clickable.cpp"
        "src/ui/widgets/ui_confirmation_popup.cpp"
        "src/ui/widgets/ui_custom_paint.cpp"
        "src/ui/widgets/ui_debug_console.cpp"
        "src/ui/widgets/ui_dropdown.cpp"
        "src/ui/widgets/ui_dropdown_multi_select.cpp"
        "src/ui/widgets/ui_framed_image.cpp"
        "src/ui/widgets/ui_gamepad_image.cpp"
        "src/ui/widgets/ui_goto_popup.cpp"
        "src/ui/widgets/ui_grid.cpp"
        "src/ui/widgets/ui_hybrid_list.cpp"
        "src/ui/widgets/ui_image.cpp"
        "src/ui/widgets/ui_input_popup.cpp"
        "src/ui/widgets/ui_label.cpp"
        "src/ui/widgets/ui_list.cpp"
        "src/ui/widgets/ui_menu_button.cpp"
        "src/ui/widgets/ui_multi_image.cpp"
		"src/ui/widgets/ui_option_list_morpher.cpp"
        "src/ui/widgets/ui_paged_pane.cpp"
        "src/ui/widgets/ui_popup_menu.cpp"
        "src/ui/widgets/ui_render_surface.cpp"
        "src/ui/widgets/ui_resize_divider.cpp"
        "src/ui/widgets/ui_scroll_pane.cpp"
        "src/ui/widgets/ui_scrollbar.cpp"
        "src/ui/widgets/ui_scrollbar_pane.cpp"
        "src/ui/widgets/ui_slider.cpp"
        "src/ui/widgets/ui_spin_control.cpp"
        "src/ui/widgets/ui_spin_control2.cpp"
		"src/ui/widgets/ui_spin_list.cpp"
        "src/ui/widgets/ui_textinput.cpp"
        "src/ui/widgets/ui_tooltip.cpp"
        "src/ui/widgets/ui_tree_list.cpp"

        "src/audio/audio_attenuation.cpp"
        "src/audio/audio_buffer.cpp"
        "src/audio/audio_clip.cpp"
        "src/audio/audio_clip_streaming.cpp"
        "src/audio/audio_emitter.cpp"
        "src/audio/audio_emitter_handle_impl.cpp"
        "src/audio/audio_engine.cpp"
        "src/audio/audio_event.cpp"
        "src/audio/audio_expression.cpp"
        "src/audio/audio_facade.cpp"
        "src/audio/audio_fade.cpp"
        "src/audio/audio_filter_biquad.cpp"
        "src/audio/audio_filter_resample.cpp"
        "src/audio/audio_handle_impl.cpp"
        "src/audio/audio_mixer.cpp"
        "src/audio/audio_object.cpp"
        "src/audio/audio_position.cpp"
        "src/audio/audio_region.cpp"
        "src/audio/audio_region_handle_impl.cpp"
        "src/audio/audio_sub_object.cpp"
        "src/audio/audio_voice.cpp"
        "src/audio/audio_sources/audio_source_clip.cpp"
        "src/audio/audio_sources/audio_source_delay.cpp"
        "src/audio/audio_sources/audio_source_layers.cpp"
        "src/audio/audio_sources/audio_source_object.cpp"
        "src/audio/audio_sources/audio_source_sequence.cpp"
        "src/audio/sub_objects/audio_sub_object_clips.cpp"
        "src/audio/sub_objects/audio_sub_object_layers.cpp"
        "src/audio/sub_objects/audio_sub_object_sequence.cpp"
        "src/audio/sub_objects/audio_sub_object_switch.cpp"
        "src/audio/lib_nogg_decoder.cpp"
        "src/audio/lib_vorbis_decoder.cpp"
        "src/audio/vorbis_dec.cpp"

        "src/audio/resampler.cpp"
        
        "src/bytes/byte_serializer.cpp"
        "src/bytes/compression.cpp"
        "src/bytes/fuzzer.cpp"
        "src/bytes/serialization_dictionary.cpp"
        
        "src/concurrency/alive_flag.cpp"
        "src/concurrency/concurrent.cpp"
        "src/concurrency/executor.cpp"
        "src/concurrency/shared_recursive_mutex.cpp"
        "src/concurrency/task.cpp"
        "src/concurrency/task_anchor.cpp"
        "src/concurrency/task_set.cpp"
        
        "src/data_structures/bin_pack.cpp"
        "src/data_structures/bit_vector.cpp"
        "src/data_structures/config_database.cpp"
        "src/data_structures/config_node.cpp"
        "src/data_structures/highscore.cpp"
        "src/data_structures/memory_pool.cpp"
        "src/data_structures/nullable_reference.cpp"
        "src/data_structures/rect_spatial_checker.cpp"
        "src/data_structures/temp_allocator.cpp"
        
        "src/file/directory_monitor.cpp"
        "src/file/path.cpp"
        
        "src/file_formats/binary_file.cpp"
        "src/file_formats/config_file.cpp"
        "src/file_formats/csv_file.cpp"
        "src/file_formats/hlif_file.cpp"
        "src/file_formats/ini_reader.cpp"
        "src/file_formats/json_convert.cpp"
        "src/file_formats/json_file.cpp"
        "src/file_formats/image.cpp"
        "src/file_formats/image_mask.cpp"
        "src/file_formats/text_file.cpp"
        "src/file_formats/text_reader.cpp"
        "src/file_formats/xml_file.cpp"
        "src/file_formats/yaml_convert.cpp"
        "src/file_formats/zip_file.cpp"
        
        "src/maths/base_transform.cpp"
        "src/maths/bezier.cpp"
        "src/maths/circle.cpp"
        "src/maths/colour_gradient.cpp"
        "src/maths/ellipse.cpp"
        "src/maths/interpolation_curve.cpp"
        "src/maths/line.cpp"
        "src/maths/matrix4.cpp"
        "src/maths/mt199937ar.cpp"
        "src/maths/polygon.cpp"
        "src/maths/quaternion.cpp"
        "src/maths/random.cpp"
        "src/maths/ray.cpp"
        "src/maths/sphere.cpp"
        "src/maths/triangle.cpp"
        "src/maths/uuid.cpp"
        
        "src/memory/memory.cpp"
        
        "src/os/os_android.cpp"
        "src/os/os.cpp"
        "src/os/os_ios.cpp"
        "src/os/os_linux.cpp"
        "src/os/os_freebsd.cpp"
        "src/os/os_mac.cpp"
		"src/os/os_gdk.cpp"
        "src/os/os_unix.cpp"
        "src/os/os_win32.cpp"
		"src/os/os_winbase.cpp"

        "src/navigation/navigation_query.cpp"
        "src/navigation/navigation_path.cpp"
        "src/navigation/navigation_path_follower.cpp"
        "src/navigation/navmesh.cpp"
        "src/navigation/navmesh_generator.cpp"
        "src/navigation/navmesh_set.cpp"
        "src/navigation/world_position.cpp"

        "src/resources/metadata.cpp"
        "src/resources/resource.cpp"
        "src/resources/resource_data.cpp"
        
        "src/support/console.cpp"
        "src/support/debug.cpp"
        "src/support/exception.cpp"
        "src/support/logger.cpp"
        "src/support/redirect_stream.cpp"
        "src/support/profiler.cpp"
        "src/support/StackWalker/StackWalker.cpp"
        
        "src/text/encode.cpp"
        "src/text/fuzzy_text_matcher.cpp"
        "src/text/i18n.cpp"
        "src/text/halleystring.cpp"
        "src/text/string_serializer.cpp"
        
        "src/time/stopwatch.cpp"

        "src/timeline/timeline.cpp"
        "src/timeline/timeline_player.cpp"
        "src/timeline/timeline_sequence.cpp"
        
        "src/utils/cryptography.cpp"
        "src/utils/encrypt.cpp"
        "src/utils/hash.cpp"
        "src/utils/variable.cpp"

        "src/editor_extensions/asset_preview_generator.cpp"
        "src/editor_extensions/choose_asset_window.cpp"
        "src/editor_extensions/component_editor_context.cpp"
        "src/editor_extensions/component_field_parameters.cpp"
        "src/editor_extensions/entity_validator.cpp"
        "src/editor_extensions/field_factories.cpp"
        "src/editor_extensions/polygon_gizmo.cpp"
        "src/editor_extensions/scene_editor.cpp"
        "src/editor_extensions/scene_editor_gizmo.cpp"
        "src/editor_extensions/standard_entity_validators.cpp"
        "src/editor_extensions/vertex_gizmo.cpp"

        "src/lua/lua_function_bind.cpp"
        "src/lua/lua_reference.cpp"
        "src/lua/lua_stack_ops.cpp"
        "src/lua/lua_state.cpp"

        "src/storage/options.cpp"
        )

set(HEADERS
        "../../../include/halley_version.hpp"

        "src/dummy/dummy_analytics.h"
        "src/dummy/dummy_audio.h"
        "src/dummy/dummy_input.h"
        "src/dummy/dummy_plugins.h"
        "src/dummy/dummy_movie.h"
        "src/dummy/dummy_network.h"
        "src/dummy/dummy_platform.h"
        "src/dummy/dummy_system.h"
        "src/dummy/dummy_video.h"
        "src/dummy/dummy_web.h"

        "include/halley/api/analytics_api.h"
        "include/halley/api/audio_api.h"
        "include/halley/api/clipboard.h"
        "include/halley/api/core_api.h"
        "include/halley/api/halley_api.h"
        "include/halley/api/halley_api_internal.h"
        "include/halley/api/input_api.h"
        "include/halley/api/movie_api.h"
        "include/halley/api/network_api.h"
        "include/halley/api/platform_api.h"
        "include/halley/api/save_data.h"
        "include/halley/api/system_api.h"
        "include/halley/api/video_api.h"

        "include/halley/entry/entry_point.h"
        "include/halley/entry/game_loader.h"

        "include/halley/game/core.h"
        "include/halley/game/environment.h"
        "include/halley/game/frame_data.h"
        "include/halley/game/frame_data_sync.h"
        "include/halley/game/game.h"
        "include/halley/game/game_console.h"
        "include/halley/game/halley_main.h"
        "include/halley/game/halley_statics.h"
        "include/halley/game/game_platform.h"
        "include/halley/game/livepp.h"
        "include/halley/game/main_loop.h"
        "include/halley/game/scene_editor_interface.h"

        "include/halley/graph/base_graph_enums.h"
        "include/halley/graph/base_graph_node.h"
        "include/halley/graph/base_graph_renderer.h"
        "include/halley/graph/base_graph_type.h"
        "include/halley/graph/base_graph.h"

        "include/halley/graphics/blend.h"
        "include/halley/graphics/camera.h"
        "include/halley/graphics/material/material_definition.h"
		"include/halley/graphics/material/material_definition.natvis"
        "include/halley/graphics/material/material.h"
		"include/halley/graphics/material/material.natvis"
        "include/halley/graphics/material/material_parameter.h"
        "include/halley/graphics/material/uniform_type.h"
        "include/halley/graphics/mesh/mesh.h"
        "include/halley/graphics/mesh/mesh_animation.h"
        "include/halley/graphics/mesh/mesh_renderer.h"
        "include/halley/graphics/movie/movie_player.h"
        "include/halley/graphics/painter.h"
        "include/halley/graphics/render_context.h"
        "include/halley/graphics/render_snapshot.h"
        "include/halley/graphics/render_target/render_graph.h"
        "include/halley/graphics/render_target/render_graph_definition.h"
        "include/halley/graphics/render_target/render_graph_node.h"
        "include/halley/graphics/render_target/render_graph_node_types.h"
        "include/halley/graphics/render_target/render_graph_pin_type.h"
        "include/halley/graphics/render_target/render_surface.h"
        "include/halley/graphics/render_target/render_target.h"
        "include/halley/graphics/render_target/render_target_screen.h"
        "include/halley/graphics/render_target/render_target_texture.h"
        "include/halley/graphics/shader.h"
        "include/halley/graphics/shader_type.h"
        "include/halley/graphics/sprite/animation.h"
        "include/halley/graphics/sprite/animation_player.h"
        "include/halley/graphics/sprite/particles.h"
        "include/halley/graphics/sprite/ipainter.h"
        "include/halley/graphics/sprite/sprite.h"
        "include/halley/graphics/sprite/sprite.natvis"
        "include/halley/graphics/sprite/sprite_painter.h"
        "include/halley/graphics/sprite/sprite_sheet.h"
        "include/halley/graphics/text/font.h"
        "include/halley/graphics/text/text_renderer.h"
        "include/halley/graphics/texture_descriptor.h"
        "include/halley/graphics/texture.h"
        "include/halley/graphics/texture.natvis"
		"include/halley/graphics/window.h"
        
        "include/halley/halley_core.h"
        
        "include/halley/input/input_button_base.h"
        "include/halley/input/input_device.h"
        "include/halley/input/input_exclusive.h"
        "include/halley/input/input_joystick.h"
        "include/halley/input/input_joystick_xinput.h"
        "include/halley/input/input_keyboard.h"
        "include/halley/input/input_keys.h"
        "include/halley/input/input_manual.h"
        "include/halley/input/input_touch.h"
        "include/halley/input/input_vibration.h"
        "include/halley/input/input_virtual.h"
        "include/halley/input/text_input_capture.h"
        "include/halley/input/text_input_data.h"
        
        "include/halley/properties/audio_properties.h"
        "include/halley/properties/game_properties.h"

        "include/halley/resources/asset_database.h"
        "include/halley/resources/asset_pack.h"
        "include/halley/resources/resource_collection.h"
        "include/halley/resources/resource_locator.h"
        "include/halley/resources/resource_reference.h"
        "include/halley/resources/resources.h"
        "include/halley/resources/standard_resources.h"

        "src/resources/resource_filesystem.h"
        "src/resources/resource_pack.h"

        "include/halley/stage/stage.h"
        "include/halley/stage/stage_id.h"

        "include/halley/version/version.h"

        "include/halley/devcon/devcon_client.h"
        "include/halley/devcon/devcon_connection.h"
        "include/halley/devcon/devcon_messages.h"
        "include/halley/devcon/devcon_server.h"

        "include/halley/net/halley_net.h"

        "include/halley/net/connection/ack_unreliable_connection.h"
        "include/halley/net/connection/ack_unreliable_connection_stats.h"
        "include/halley/net/connection/iconnection.h"
        "include/halley/net/connection/imessage_stream.h"
        "include/halley/net/connection/instability_simulator.h"
        "include/halley/net/connection/message_queue.h"
        "include/halley/net/connection/message_queue_tcp.h"
        "include/halley/net/connection/message_queue_udp.h"
        "include/halley/net/connection/network_message.h"
        "include/halley/net/connection/network_packet.h"
        "include/halley/net/connection/network_service.h"
        "include/halley/net/connection/standard_message_stream.h"

        "include/halley/net/entity/entity_network_message.h"
        "include/halley/net/entity/entity_network_remote_peer.h"
		"include/halley/net/entity/entity_network_serialize.h"
        "include/halley/net/entity/entity_network_session.h"

        "include/halley/net/session/network_session_control_messages.h"
        "include/halley/net/session/network_session_messages.h"
        "include/halley/net/session/network_session_peer.h"
        "include/halley/net/session/network_session.h"
        "include/halley/net/session/session.h"
        "include/halley/net/session/session_multiplayer.h"
        "include/halley/net/session/shared_data.h"

		"include/halley/net/interpolators/byte_data_interpolator.h"
        "include/halley/net/interpolators/data_interpolator.h"

        "include/halley/entity/halley_entity.h"

        "include/halley/entity/component.h"
        "include/halley/entity/create_functions.h"
        "include/halley/entity/ecs_reflection.h"
        "include/halley/entity/ecs_reflection_impl.h"
        "include/halley/entity/entity.h"
        "include/halley/entity/entity.natvis"
        "include/halley/entity/entity_data.h"
        "include/halley/entity/entity_data_delta.h"
        "include/halley/entity/entity_data_instanced.h"
        "include/halley/entity/family_binding.h"
        "include/halley/entity/family_extractor.h"
        "include/halley/entity/entity_factory.h"
        "include/halley/entity/entity_id.h"
        "include/halley/entity/entity_ref.natvis"
        "include/halley/entity/entity_scene.h"
        "include/halley/entity/entity_stage.h"
        "include/halley/entity/family.h"
        "include/halley/entity/family_mask.h"
        "include/halley/entity/family_type.h"
        "include/halley/entity/inspector.h"
        "include/halley/entity/message.h"
        "include/halley/entity/prefab.h"
        "include/halley/entity/prefab_scene_data.h"
        "include/halley/entity/registry.h"
        "include/halley/entity/service.h"
        "include/halley/entity/system.h"
        "include/halley/entity/system_interface.h"
        "include/halley/entity/system_message.h"
        "include/halley/entity/type_deleter.h"
        "include/halley/entity/world.h"
        "include/halley/entity/world_reflection.h"
        "include/halley/entity/world_scene_data.h"

        "include/halley/entity/components/transform_2d_component.h"

        "include/halley/entity/services/debug_draw_service.h"
        "include/halley/entity/services/dev_service.h"
        "include/halley/entity/services/enable_rules_service.h"
        "include/halley/entity/services/painter_service.h"
        "include/halley/entity/services/screen_service.h"
        "include/halley/entity/services/scripting_service.h"
        "include/halley/entity/services/session_service.h"

        "include/halley/diagnostics/audio_view.h"
        "include/halley/diagnostics/frame_debugger.h"
        "include/halley/diagnostics/performance_stats.h"
        "include/halley/diagnostics/stats_view.h"
        "include/halley/diagnostics/world_stats.h"

        "include/halley/scripting/script_environment.h"
        "include/halley/scripting/script_graph.h"
        "include/halley/scripting/script_message.h"
        "include/halley/scripting/script_node_enums.h"
        "include/halley/scripting/script_node_type.h"
        "include/halley/scripting/script_renderer.h"
        "include/halley/scripting/script_state.h"
        "include/halley/scripting/script_state_set.h"
        "include/halley/scripting/script_variables.h"

        "src/scripting/nodes/script_audio.h"
        "src/scripting/nodes/script_branching.h"
        "src/scripting/nodes/script_entity.h"
        "src/scripting/nodes/script_execution_control.h"
        "src/scripting/nodes/script_logic_gates.h"
        "src/scripting/nodes/script_flow_gate.h"
        "src/scripting/nodes/script_function.h"
        "src/scripting/nodes/script_input.h"
        "src/scripting/nodes/script_loop.h"
        "src/scripting/nodes/script_lua.h"
        "src/scripting/nodes/script_messaging.h"
        "src/scripting/nodes/script_meta.h"
        "src/scripting/nodes/script_network.h"
        "src/scripting/nodes/script_node_variables.h"
        "src/scripting/nodes/script_sprite.h"
        "src/scripting/nodes/script_transform.h"
        "src/scripting/nodes/script_ui.h"
        "src/scripting/nodes/script_wait.h"
        "src/scripting/nodes/script_wait_for.h"

        "include/halley/ui/halley_ui.h"

        "include/halley/ui/ui_anchor.h"
        "include/halley/ui/ui_behaviour.h"
        "include/halley/ui/ui_colour_scheme.h"
        "include/halley/ui/ui_data_bind.h"
        "include/halley/ui/ui_definition.h"
        "include/halley/ui/ui_element.h"
        "include/halley/ui/ui_entity_widget_reference.h"
        "include/halley/ui/ui_event.h"
        "include/halley/ui/ui_event_handler.h"
        "include/halley/ui/ui_factory.h"
        "include/halley/ui/ui_factory_tester.h"
        "include/halley/ui/ui_input.h"
        "include/halley/ui/ui_painter.h"
        "include/halley/ui/ui_parent.h"
        "include/halley/ui/ui_root.h"
        "include/halley/ui/ui_sizer.h"
        "include/halley/ui/ui_style.h"
        "include/halley/ui/ui_stylesheet.h"
        "include/halley/ui/ui_validator.h"
        "include/halley/ui/ui_widget.h"

        "include/halley/ui/behaviours/ui_fade_behaviour.h"
        "include/halley/ui/behaviours/ui_fullscreen_behaviour.h"
        "include/halley/ui/behaviours/ui_notify_destroy_behaviour.h"
        "include/halley/ui/behaviours/ui_reload_ui_behaviour.h"
        "include/halley/ui/behaviours/ui_slide_behaviour.h"
        "include/halley/ui/behaviours/ui_transition_slide_behaviour.h"

        "include/halley/ui/widgets/ui_animation.h"
        "include/halley/ui/widgets/ui_button.h"
        "include/halley/ui/widgets/ui_checkbox.h"
        "include/halley/ui/widgets/ui_clickable.h"
        "include/halley/ui/widgets/ui_confirmation_popup.h"
        "include/halley/ui/widgets/ui_custom_paint.h"
        "include/halley/ui/widgets/ui_debug_console.h"
        "include/halley/ui/widgets/ui_dropdown.h"
        "include/halley/ui/widgets/ui_dropdown_multi_select.h"
        "include/halley/ui/widgets/ui_framed_image.h"
        "include/halley/ui/widgets/ui_gamepad_image.h"
        "include/halley/ui/widgets/ui_goto_popup.h"
        "include/halley/ui/widgets/ui_grid.h"
        "include/halley/ui/widgets/ui_hybrid_list.h"
        "include/halley/ui/widgets/ui_image.h"
        "include/halley/ui/widgets/ui_input_popup.h"
        "include/halley/ui/widgets/ui_label.h"
        "include/halley/ui/widgets/ui_list.h"
        "include/halley/ui/widgets/ui_menu_button.h"
        "include/halley/ui/widgets/ui_multi_image.h"
		"include/halley/ui/widgets/ui_option_list_morpher.h"
        "include/halley/ui/widgets/ui_paged_pane.h"
        "include/halley/ui/widgets/ui_popup_menu.h"
        "include/halley/ui/widgets/ui_render_surface.h"
        "include/halley/ui/widgets/ui_resize_divider.h"
        "include/halley/ui/widgets/ui_scroll_pane.h"
        "include/halley/ui/widgets/ui_scrollbar.h"
        "include/halley/ui/widgets/ui_scrollbar_pane.h"
        "include/halley/ui/widgets/ui_slider.h"
        "include/halley/ui/widgets/ui_spin_control.h"
        "include/halley/ui/widgets/ui_spin_control2.h"
		"include/halley/ui/widgets/ui_spin_list.h"
        "include/halley/ui/widgets/ui_textinput.h"
        "include/halley/ui/widgets/ui_tooltip.h"
        "include/halley/ui/widgets/ui_tree_list.h"

        "include/halley/audio/audio_attenuation.h"
        "include/halley/audio/audio_buffer.h"
        "include/halley/audio/audio_clip.h"
        "include/halley/audio/audio_clip_streaming.h"
        "include/halley/audio/audio_env.h"
        "include/halley/audio/audio_event.h"
        "include/halley/audio/audio_expression.h"
        "include/halley/audio/audio_facade.h"
        "include/halley/audio/audio_fade.h"
        "include/halley/audio/audio_filter_biquad.h"
        "include/halley/audio/audio_object.h"
        "include/halley/audio/audio_position.h"
        "include/halley/audio/audio_source.h"
        "include/halley/audio/audio_sub_object.h"
        "include/halley/audio/halley_audio.h"
        "include/halley/audio/vorbis_dec.h"
        "include/halley/audio/sub_objects/audio_sub_object_clips.h"
        "include/halley/audio/sub_objects/audio_sub_object_layers.h"
        "include/halley/audio/sub_objects/audio_sub_object_sequence.h"
        "include/halley/audio/sub_objects/audio_sub_object_switch.h"
        "src/audio/audio_sources/audio_source_clip.h"
        "src/audio/audio_sources/audio_source_delay.h"
        "src/audio/audio_sources/audio_source_layers.h"
        "src/audio/audio_sources/audio_source_object.h"
        "src/audio/audio_sources/audio_source_sequence.h"
        "src/audio/audio_emitter.h"
        "src/audio/audio_emitter_handle_impl.h"
        "src/audio/audio_engine.h"
        "src/audio/audio_filter_resample.h"
        "src/audio/audio_handle_impl.h"
        "src/audio/audio_region_handle_impl.h"
        "src/audio/audio_mixer.h"
        "src/audio/audio_region.h"
        "src/audio/audio_voice.h"
        "src/audio/lib_vorbis_decoder.h"
        "src/audio/lib_nogg_decoder.h"

        "include/halley/audio/resampler.h"
        
        "include/halley/bytes/byte_serializer.h"
		"include/halley/bytes/byte_serializer_base.h"
        "include/halley/bytes/config_node_serializer.h"
        "include/halley/bytes/config_node_serializer_base.h"
        "include/halley/bytes/compression.h"
        "include/halley/bytes/fuzzer.h"
        "include/halley/bytes/iserialization_dictionary.h"
        "include/halley/bytes/serialization_dictionary.h"

        "include/halley/concurrency/alive_flag.h"
        "include/halley/concurrency/concurrent.h"
        "include/halley/concurrency/executor.h"
        "include/halley/concurrency/future.h"
        "include/halley/concurrency/mutex.h"
        "include/halley/concurrency/shared_recursive_mutex.h"
        "include/halley/concurrency/task.h"
        "include/halley/concurrency/task_anchor.h"
        "include/halley/concurrency/task_set.h"
        
        "include/halley/data_structures/bin_pack.h"
        "include/halley/data_structures/bit_vector.h"
        "include/halley/data_structures/config_database.h"
        "include/halley/data_structures/config_node.h"
        "include/halley/data_structures/config_node.natvis"
        "include/halley/data_structures/dynamic_grid.h"
        "include/halley/data_structures/flat_map.h"
        "include/halley/data_structures/hash_map.h"
        "include/halley/data_structures/hash_map.natvis"
        "include/halley/data_structures/hash_set.natvis"
        "include/halley/data_structures/highscore.h"
        "include/halley/data_structures/listener_set.h"
        "include/halley/data_structures/mapped_pool.h"
        "include/halley/data_structures/maybe.h"
        "include/halley/data_structures/maybe_ref.h"
        "include/halley/data_structures/memory_pool.h"
        "include/halley/data_structures/nullable_reference.h"
        "include/halley/data_structures/override_set.h"
        "include/halley/data_structures/priority_queue.h"
        "include/halley/data_structures/rect_spatial_checker.h"
        "include/halley/data_structures/ring_buffer.h"
        "include/halley/data_structures/selection_set.h"
        "include/halley/data_structures/simple_pool.h"
        "include/halley/data_structures/temp_allocator.h"
        "include/halley/data_structures/time_cache.h"
        "include/halley/data_structures/tree_map.h"
        "include/halley/data_structures/vector.h"
        "include/halley/data_structures/vector_size32.h"
        "include/halley/data_structures/vector_size32.natvis"
        
        "include/halley/file/directory_monitor.h"
        "include/halley/file/path.h"
        "include/halley/file/path.natvis"
        
        "src/file_formats/config_file_serialization_state.h"
        "include/halley/file_formats/binary_file.h"
        "include/halley/file_formats/config_file.h"
        "include/halley/file_formats/csv_file.h"
        "include/halley/file_formats/halley-yamlcpp.h"
        "include/halley/file_formats/hlif_file.h"
        "include/halley/file_formats/image.h"
        "include/halley/file_formats/image_mask.h"
        "include/halley/file_formats/ini_reader.h"
        "include/halley/file_formats/json_convert.h"
        "include/halley/file_formats/json_file.h"
        "include/halley/file_formats/json_forward.h"
        "include/halley/file_formats/json/json.h"
        "include/halley/file_formats/text_file.h"
        "include/halley/file_formats/text_reader.h"
        "include/halley/file_formats/xml_file.h"
        "include/halley/file_formats/xml_forward.h"
        "include/halley/file_formats/yaml_convert.h"
        "include/halley/file_formats/zip_file.h"
        
        "include/halley/halley_json.h"
        "include/halley/halley_utils.h"
        "include/halley/maths/angle.h"
        "include/halley/maths/base_transform.h"
        "include/halley/maths/bezier.h"
        "include/halley/maths/box.h"
        "include/halley/maths/circle.h"
        "include/halley/maths/colour.h"
        "include/halley/maths/colour.natvis"
        "include/halley/maths/colour_gradient.h"
        "include/halley/maths/ellipse.h"
        "include/halley/maths/interpolation_curve.h"
        "include/halley/maths/line.h"
        "include/halley/maths/matrix4.h"
        "include/halley/maths/ops.h"
        "include/halley/maths/polygon.h"
        "include/halley/maths/polygon.natvis"
        "include/halley/maths/quaternion.h"
        "include/halley/maths/random.h"
        "include/halley/maths/ray.h"
        "include/halley/maths/rolling_data_set.h"
        "include/halley/maths/sphere.h"
        "include/halley/maths/triangle.h"
        "include/halley/maths/uuid.h"
        "include/halley/maths/uuid.natvis"
        "src/maths/mt199937ar.h"
        "include/halley/maths/range.h"
        "include/halley/maths/rect.h"
        "include/halley/maths/simd.h"
        "include/halley/maths/tween.h"
        "include/halley/maths/vector2.h"
        "include/halley/maths/vector2.natvis"
        "include/halley/maths/vector3.h"
        "include/halley/maths/vector4.h"
        
        "include/halley/os/os.h"

        "include/halley/navigation/navigation_query.h"
        "include/halley/navigation/navigation_path.h"
        "include/halley/navigation/navigation_path_follower.h"
        "include/halley/navigation/navmesh.h"
        "include/halley/navigation/navmesh_generator.h"
        "include/halley/navigation/navmesh_set.h"
        "include/halley/navigation/world_position.h"
            
        "include/halley/plugin/plugin.h"
        
        "include/halley/resources/metadata.h"
        "include/halley/resources/resource_data.h"
        "include/halley/resources/resource.h"
        "include/halley/resources/resource.natvis"

        "include/halley/support/assert.h"
        "include/halley/support/console.h"
        "include/halley/support/debug.h"
        "include/halley/support/exception.h"
        "include/halley/support/logger.h"
        "include/halley/support/redirect_stream.h"
        "include/halley/support/profiler.h"

        "include/halley/text/encode.h"
        "include/halley/text/enum_names.h"
        "include/halley/text/fuzzy_text_matcher.h"
        "include/halley/text/halleystring.h"
        "include/halley/text/halleystring.natvis"
        "include/halley/text/i18n.h"
        "include/halley/text/string_converter.h"
        "include/halley/text/string_serializer.h"

        "include/halley/time/halleytime.h"
        "include/halley/time/stopwatch.h"

        "include/halley/timeline/timeline.h"
        "include/halley/timeline/timeline_player.h"
        "include/halley/timeline/timeline_sequence.h"

        "include/halley/utils/algorithm.h"
        "include/halley/utils/attributes.h"
        "include/halley/utils/averaging.h"
        "include/halley/utils/convertible_to.h"
        "include/halley/utils/cryptography.h"
        "include/halley/utils/encrypt.h"
        "include/halley/utils/hash.h"
        "include/halley/utils/halley_iostream.h"
        "include/halley/utils/macros.h"
        "include/halley/utils/noncopyable.h"
        "include/halley/utils/scoped_guard.h"
        "include/halley/utils/type_traits.h"
        "include/halley/utils/utils.h"
        "include/halley/utils/variable.h"

        "src/os/os_android.h"
        "src/os/os_ios.h"
        "src/os/os_linux.h"
        "src/os/os_mac.h"
		"src/os/os_gdk.h"
        "src/os/os_unix.h"
        "src/os/os_win32.h"
		"src/os/os_winbase.h"

        "src/support/StackWalker/StackWalker.h"
        
        "include/halley/editor_extensions/halley_editor_extensions.h"

        "include/halley/editor_extensions/asset_preview_generator.h"
        "include/halley/editor_extensions/choose_asset_window.h"
        "include/halley/editor_extensions/component_editor_context.h"
        "include/halley/editor_extensions/component_field_parameters.h"
        "include/halley/editor_extensions/editor_custom_tools_interface.h"
        "include/halley/editor_extensions/entity_validator.h"
        "include/halley/editor_extensions/field_factories.h"
        "include/halley/editor_extensions/polygon_gizmo.h"
        "include/halley/editor_extensions/scene_editor_input_state.h"
        "include/halley/editor_extensions/scene_editor.h"
        "include/halley/editor_extensions/scene_editor_gizmo.h"
        "include/halley/editor_extensions/standard_entity_validators.h"
        "include/halley/editor_extensions/vertex_gizmo.h"

        "include/halley/lua/halley_lua.h"
        "include/halley/lua/lua_function_bind.h"
        "include/halley/lua/lua_reference.h"
        "include/halley/lua/lua_stack_ops.h"
        "include/halley/lua/lua_state.h"

        "include/halley/storage/options.h"
        
        "src/prec.h"
        )

assign_source_group(${SOURCES})
assign_source_group(${HEADERS})

add_library (halley-engine ${SOURCES} ${HEADERS})
target_link_libraries(halley-engine halley-contrib  ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})

add_definitions(-DDONT_INCLUDE_HALLEY_HPP)

if (_GAMING_DESKTOP OR _GAMING_XBOX)
	target_include_directories(halley-engine PRIVATE $ENV{GRDKLatest}GameKit/Include $ENV{GXDKLatest}gameKit/Include)
	if (_GAMING_XBOX_XBOXONE)
		target_include_directories(halley-engine PRIVATE $ENV{GXDKLatest}gameKit/Include/XboxOne)
    elseif (_GAMING_XBOX_SCARLETT)
		target_include_directories(halley-engine PRIVATE $ENV{GXDKLatest}gameKit/Include/Scarlett)
	endif()
endif ()

# Hack, there should be no platform specific stuff in core...
if (USE_ANDROID)
    target_link_libraries(halley-engine log android)
endif ()

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
    if (NOT EMSCRIPTEN)
        set_source_files_properties("src/maths/matrix4.cpp" PROPERTIES COMPILE_FLAGS "-msse3")
    endif()
endif ()

if (MSVC)
        set_source_files_properties(src/audio/audio_mixer_avx.cpp PROPERTIES COMPILE_FLAGS /arch:AVX)
else ()
        set_source_files_properties(src/audio/audio_mixer_avx.cpp PROPERTIES COMPILE_FLAGS -mavx)
endif ()

target_precompile_headers(halley-engine PUBLIC "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/src/prec.h>")
